#
# Job.py
# (c) 2008 Will Baker.
#

class Job:
    HighPriority   = 2
    MediumPriority = 1
    LowPriority    = 0
    
    """
    A Job to be executed in the next available thread. On creation a Job is
    added to a JobQueue, to be processed when a JobThread is available.
    """
    def __init__( self, priority, queue ):
        self.queue = queue
        self.priority = priority
        queue.add_job( self )
        
    def start( self ):
        """
        Start this Job. Calling the base class method is invalid. This function 
        generally occurs in a JobThread, not in the main thread.
        """
        assert( False )
